package pro;

/**
 * @Description: TODO
 * @author: muxiongxiong
 * @date: 2021年07月02日 15:15
 * 公众号：雄雄的小课堂
 * 博客：https://blog.csdn.net/qq_34137397
 * 个人站：http://www.穆雄雄.com
 */
public abstract class Pet {
    private String name = "无名氏";
    private int health = 100;
    private int love = 0;

   public Pet() {
      // System.out.println("执行父类无参的构造方法");
   }

    public Pet(String name, int health, int love) {
        //System.out.println("执行父类有参的构造方法");
        this.name = name;
        this.health = health;
        this.love = love;

    }

    //喂吃的的方法
    public abstract void eat();

    public abstract void show();
    /*{
        System.out.println("姓名是：" + this.name);
        System.out.println("健康值是：" + this.health);
        System.out.println("亲密度是：" + this.love);
    }*/

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }
}
